<template>
  <div class="mine">
    我的,个人中心，需要有用户权限才能访问
    <button @click="logoutHandler">退出登录</button>
  </div>
</template>

<script>
import { mapActions } from 'vuex'
export default {
  name: 'Mine',
  methods: {
    ...mapActions(['logoutAsync']),
    logoutHandler () {
      this.logoutAsync().then(res => {
        console.log('退出')
        this.$router.push('/')
      })
    }
  }
}
</script>

<style lang="scss" scoped>

</style>
